#ifndef MY_MQTT_CLIENT_H
#define MY_MQTT_CLIENT_H

#include "mqttClient.h"
#include "mqttProtocol.h"
#include "pcbDetectCtx.h"

// 继承MqttClient以实现自定义的消息处理
class MyMqttClient : public MqttClient {

private:
const ProtocolHandler &pHandler;

public:
PCBDetectionContext* pPcbCtx;

public:
    MyMqttClient(const std::vector<std::string>& topics, const ProtocolHandler &handler, PCBDetectionContext* pcbCtx);
    
    // 重写消息处理函数
    void handleMessage(const std::string& topic, const std::string& payload) override;
};

#endif // MY_MQTT_CLIENT_H